@extends('admin.layout')
@section('title', $title)
@section('content')
<div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                {{$title}}
                <small>请您注册用户
                    @if(session('info'))
                        <span class="text-red">{{session('info')}}</span>
                    @endif
                </small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="{{ url('/Admin/index') }}"><i class="fa fa-dashboard"></i>主页</a></li>
                <li><a href="{{ url('/Admin/user/index') }}">用户管理</a></li>
                <li class="active">注册用户</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-8">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">注册您的用户</h3>
                        </div><!-- /.box-header -->
                        <!-- form start -->
                        <form role="form" action="{{ url('/Admin/register/insert') }}" method="post" enctype="multipart/form-data" >
                            {{ csrf_field() }}
                            @if (count($errors) > 0)
                                <div class="alert alert-danger">
                                    <ul>
                                        @foreach ($errors->all() as $error)
                                            <li>{{ $error }}</li>
                                        @endforeach
                                    </ul>
                                </div>
                            @endif
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="exampleInputEmail1">请您输入用户名</label>
                                    <input type="text" name="hd_name" value="{{ old('hd_name') }}" class="form-control" id="exampleInputEmail1"
                                           placeholder="请您输入用户名">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">请您输入密码</label>
                                    <input type="password" name="hd_pass" class="form-control" id="exampleInputPassword1"
                                           placeholder="请您输入密码">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">请您确认密码</label>
                                    <input type="password" name="hd_repass" class="form-control" id="exampleInputPassword1"
                                           placeholder="请您确认密码">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">请您选择性别</label><br/>
                                    <select name="hd_sex" style="width:90px;">
                                        <option value="1" value="{{ old('hd_sex') }}">　　女　</option>
                                        <option value="2" value="{{ old('hd_sex') }}">　　男　</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">请选择注册级别</label><br/>
                                    <select name="hd_status" style="width:120px;">
                                        <option value="1" value="{{ old('hd_status') }}">　 普通用户　</option>
                                        <option value="2" value="{{ old('hd_status') }}">　　管理员　</option>
                                        <option value="3" value="{{ old('hd_status') }}">　超级管理员</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">请您输入手机号</label>
                                    <input type="text" name="hd_phone" value="{{ old('hd_phone') }}" class="form-control" id="exampleInputPassword1"
                                           placeholder="请您输入手机号">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">请您输入邮箱</label>
                                    <input type="email" name="hd_email" value="{{ old('hd_email') }}" class="form-control" id="exampleInputEmail1"
                                           placeholder="请您输入邮箱">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputFile">请上传你的头像</label>
                                    <input type="file" name="hd_pic" id="exampleInputFile">
                                    <p class="help-block">如果不上传自己靓照,系统默认给你丑黑照</p>
                                </div>
                            </div><!-- /.box-body -->
                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </form>
                    </div><!-- /.box -->
                </div><!--/.col (left) -->
                <!-- right column -->
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
@endsection